package designPattern.action11.interpreter.c26t5;

import designPattern.action11.interpreter.c26t5.concrete.SentenceNode;
import designPattern.action11.interpreter.c26t5.sketch.Context;
import designPattern.action11.interpreter.c26t5.sketch.Node;

public class Application {
    public static void main(String args[]) {

        Node node = new SentenceNode();
        String text;
        Context context = new Context();

        text = "Teacher beat tiger";
        context.setContext(text);
        node.parse(context);
        node.execute();

        text = "You eat  apple";
        context.setContext(text);
        System.out.println();
        node.parse(context);
        node.execute();

        text = "you look  him";
        context.setContext(text);
        System.out.println();
        node.parse(context);
        node.execute();
    }
}